let debounce = (fn,delay)=>{
  let timer = null;
  return function(){
    timer &&clearTimeout(timer)
    timer = setTimeout(()=>{
      fn()
    },delay)
  }
}
export default debounce;